package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ciaojian.core.model.vo.WorkerVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 门店
 *
 * @author Atlakyn
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("d_store")
public class Store extends Model<Store> {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("门店id")
    private Integer id;

    @ApiModelProperty("门店标题")
    private String title;
    private String cityCode;
    private String province;

    /**
     * 门店背景图
     */
    private String background;

    private String city;

    private String area;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("纬度")
    private Double lat;

    @ApiModelProperty("经度")
    private Double lng;

    private Integer checkDis;

    private Integer close;

    @ApiModelProperty("门店类型 1/普通店 2/加盟 3/联名 4/旗舰 5/快闪")
    private Integer type;

    private Integer businessStatus;

    private Integer isDel;

    private double price;

    private double priceChildren;

    private Integer comesoon;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date comesoonTime;

    private String zaoStart;

    private String zaoEnd;

    private String zhongStart;
    private String zhongEnd;
    private String wanStart;
    private String wanEnd;
    private String telphone;
    private String mchId;
    private String payKey;
    private String openShopUuid;
    private String serviceList;
    private String timeUser;
    private String stopMsg;

    @TableField(exist = false)
    private List<WorkerVo> dWorkerList;

    @ApiModelProperty("加盟商 Id")
    private Integer franchiseesId;

    @ApiModelProperty("门店状态 1正常营业 2升级改造 3即将开业 4门店调休")
    private Integer state;

    @ApiModelProperty("状态 0正常 1下架")
    private Integer businessType;

    @ApiModelProperty("门店标识")
    private String tag;

    @TableField(exist = false)
    private Double miter;

    @TableField(exist = false)
    private Integer num;

    @ApiModelProperty("是否隐藏")
    private Integer isHidden;

    @ApiModelProperty("休息日")
    private String restDay;

    @ApiModelProperty("创建时间")
    private Date createTime;

    private Boolean first;

    private Integer firstMoney;

    private String firstDay;

    /**
     * 详情页文本
     */
    private String detailText;

    private Integer qrCodenum;
    private Integer qrHair;


    private int franchiseesStatus;
    private Date franchiseesStartTime;
    private Date franchiseesEndTime;
    private Date franchiseesOpenTime;
    private String franchiseesStorePhone;
    private String  franchiseesStoreName;
    private String franchiseesStorePassword;
    private BigDecimal franchiseesStoreAmount;

}
